-- 传奇游戏专属配置
local Config = {
    -- 基础配置
    SCREEN_WIDTH = 900,   -- 屏幕宽度
    SCREEN_HEIGHT = 1600, -- 屏幕高度

    -- 战斗配置
    COMBAT = {
        ATTACK_INTERVAL = 1800,             -- 传奇专属攻击间隔(ms)
        DETECTION_THRESHOLD = 92,           -- 颜色检测阈值
        AUTO_ATTACK_COORDS = { 1450, 420 }, -- 自动攻击按钮坐标
        AUTO_ATTACK_STATUS_COLORS = {       -- 传奇专属颜色特征
            { 1440, 435, 0xd8c8a5 },
            { 1452, 435, 0x9a8e76 },
            { 1468, 433, 0xa19785 },
            { 1476, 435, 0x8f846c }
        },
        ATTACKING_MONSTER_COLORS = { -- 传奇怪物头框颜色
            { 32, 334, 0xc1a35b },
            { 39, 339, 0xb0914b },
            { 37, 343, 0xb6974d },
            { 39, 352, 0x957535 }
        },
    },

    -- 其他配置保持不变，仅修改游戏专属部分
    INVENTORY = {
        BAG_OPEN_COORDS = { 1458, 324, 800 },
        BAG_CLOSE_COORDS = { 913, 150, 800 },
        SORT_BAG_COORDS = { 808, 626, 800 },
        RECYCLE_COORDS = { 685, 620, 800 },
        BAG_SLOTS = {
            { 120, 185, 800 },
            { 122, 286, 800 },
            { 122, 373, 800 }
        },
        RECYCLE_SEQUENCE = {
            { 1458, 324, 800 },
            { 685, 620, 800 },
            { 1154, 613, 800 },
            { 1406, 181, 800 },
            { 913, 150, 800 }
        }
    },

    SHOP = {
        OPEN_SHOP_COORDS = { 535, 825, 800 },
        CLOSE_SHOP_COORDS = { 1358, 124, 800 },
        ITEMS = {
            RED_POTION = { 511, 629, 800 },
            BLUE_POTION = { 849, 628, 800 },
            SUN_POTION = { 1190, 630, 800 },
            TOWN_STONE = { 473, 240, 800 },
            RANDOM_STONE = { 806, 235, 800 },
            REPAIR_WATER = { 1157, 241, 800 }
        }
    },

    -- 传奇专属BOSS地图配置
    BOSS_MAPS = {
        ['赤月峡谷'] = {
            ENTRY_POINT = { 720, 430 },
            NPC_COLOR = { 0xFF3300, "5|8|0x7A0000,20|15|0x005500", 90 },
            BUTTONS = { { 820, 620 }, { 700, 570 } },
            OCR_AREA = { 90, 50, 290, 100 }
        },
        ['祖玛寺庙'] = {
            MAP_NAME_POINT = { { 1480, 65, 0xfdfdfd }, { 1492, 65, 0xffffff } },
            DRAG_DIRECTION = 'north',
            DRAG_TIME = 1800,
            NPC_COLOR = { 0xeaaa8b, "-10|5|0xfcf7f2,21|15|0x431d0e" },
            BUTTONS = { { 920, 360, 0x2f2c2d } }
        }
    },

    -- 其他配置保持与原文件一致
    CONTRACT_MAP = {
        ENABLED = true,
        CHECK_INTERVAL = 60000,
        MAP_FEATURE = {
            color = 0x4A412A,
            pattern = "10|5|0x4A412A,25|15|0x5B5133",
            region = { 0, 0, 900, 1600 }
        },
        NAVIGATION_POINTS = {
            { x = 500, y = 800, tolerance = 15 },
            { x = 600, y = 750, tolerance = 15 }
        },
        TOWN_STONE_CHECK = { 473, 240, 800 },
        BUY_COORDS = { 535, 825, 800 },
        TELEPORT_NPC = {
            COLOR = 0x00ff00,
            PATTERN = "10|5|0xffffff,15|10|0x0000ff",
            REGION = { 500, 300, 800, 600 }
        },
        DIALOG_BUTTON = { 900, 600, 800 },
        ENTRANCE_COORDS = { 750, 550, 800 },
        BUY_BUTTON = { 1095, 594, 800 },
        ADD_BUTTON = { 1184, 409, 100 }
    },

    MOVEMENT = {
        MAP_DETECTION_COLORS = {
            CONTRACT_MAP = {
                { 1464, 62, 0x000000 },
                { 1485, 62, 0x151515 },
                { 1514, 63, 0x040404 },
                { 1537, 64, 0x000000 }
            },
            DEVIL_WORM_VALLEY = {
                { 1457, 53, 0x939393 },
                { 1474, 64, 0x0e0e0e }
            }
        },
        SAFE_ZONE_COLORS = {
            {
                { 1469, 56, 0xfefefe },
                { 1478, 56, 0xffffff },
                { 1498, 56, 0xffffff },
                { 1526, 56, 0x0d0d0c }
            }
        },
        QUICK_BAR = {
            { 764, 671, 0xb210af },
            { 842, 677, 0xb12348 },
            { 911, 671, 0x820378 },
            { 984, 674, 0x7b1b54 },
            { 1060, 674, 0x6a4d2e },
            { 1135, 671, 0x8c10af }
        },
        back_stone_area = { x1 = 733, y1 = 634, x2 = 1175, y2 = 705 },
        back_stone_colors = {
            main_color = 0xf701ac,
            offsets = "5|6|0x251a31,11|9|0xde00b2"
        },
        random_stone_colors = {
            main_color = 0xe0b123,
            offsets = "3|4|0x5c4413,8|8|0xffdb0b"
        }
    },

    MAP = {
        IS_OPEN_MAP_COLORS = { { 1324, 204, 0x91271d }, { 1332, 205, 0xa83726 }, { 1327, 182, 0xd4c956 } },
        OPEN_MAP_COORDS = { 1500, 121 },
        CLOSE_MAP_COORDS = { 1500, 114 },
        USE_RANDOM_STONE_COORDS = {1145,735},
        USE_BACK_STONE_COORDS = {1147,651}
    },

    SAFE_ZONES = {
        {
            ENTRY_COORDS = { 536, 452 },
            NPC_POINT = { 313, 371, 800 }
        }
    },

    BOSS = {
        CHECK_INTERVAL = 2500
    },

    COLOR_MATCH = {
        ATTEMPTS = 6,
        RETRY_INTERVAL = 1200
    },

    BAIDU_OCR = {
        API_KEY = "1iCsjUpZ95zCoqSIVNOsxwYe",
        SECRET_KEY = "PRmiCrBtFWBxukMFOKsS7Cl1zGBBr9QQ",
        OCR_URL = "https://aip.baidubce.com/rest/2.0/ocr/v1/numbers"
    }
}

return Config